
// This guard ensures that windows implementation is used only
// on windows platform.
#ifndef MY_USE_WIN32

    #error Windows version of __FILE__ is used without MY_USE_WIN32 defined.

#endif

#include <cstdlib>

#include "Core/Win32/ApplicationImp.hpp"

namespace My
{
    ApplicationImp::ApplicationImp()
    {
        m_Instance = static_cast<HINSTANCE>(GetModuleHandle(NULL));
    }

    ApplicationImp::~ApplicationImp()
    {
    }

    int32_t ApplicationImp::Run()
    {
        MSG message;

        while(GetMessage(&message, NULL, 0, 0) > 0)
        {
            TranslateMessage(&message);
            DispatchMessage(&message);
        }

        return message.wParam;
    }
}
